home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 June: Reference Library / Dev.CD Jun 00 RL Disk 1.toast / pc / technical documentation / develop / develop issue 28 / develop issue 28 code / sketch / source / main / assertion.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-11  |  782 b   |  29 lines

  1. /****************************************************************************
  2.  * 
  3.  * Assertion.h
  4.  *
  5.  ****************************************************************************/
  6.  
  7. #ifndef __ASSERTION__
  8. #define __ASSERTION__
  9.  
  10. #define __USEASSERTIONS__ TRUE
  11.  
  12. // ------------------------------------------------------------------------------
  13.  
  14. #define    kAssertAlways            0
  15. #define  kAssertNever            1
  16.  
  17. // ------------------------------------------------------------------------------
  18.  
  19. #if __USEASSERTIONS__
  20.     void        DoAssert                                  (Boolean condition, char *message);
  21.     #define    Assert(condition, message)            DoAssert((condition), (message))
  22. #else
  23.     #define    Assert(condition, message)            ((void)0)
  24. #endif
  25.  
  26. // ------------------------------------------------------------------------------
  27.  
  28. #endif
  29.